# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        潘炎珍  
# Name:         demo16
# Description:
# Author:       98745
# Date:         2019/6/9
#-------------------------------------------------------------------------------

from flask_bootstrap import Bootstrap
from  flask import Flask,render_template

app=Flask(__name__)
bootstrap=Bootstrap(app)

@app.route('/500')
def index():
    raise Exception('服务器内部错误，请检查代码')

@app.errorhandler(404)
def page_not_found(e):
    print(e)
    return render_template('404.txt'),404

@app.errorhandler(500)
def internal_server_error(e):
    return render_template('500.txt',error=e),500

if __name__ == '__main__':
    app.run()

